<template xmlns="http://www.w3.org/1999/html">

  <div class="confirmOrderBox wap">
    <x-header :left-options="{backText: ''}" class="whiteTheme">
      <span>确认订单</span>
    </x-header>
    <div class="list main" >
      <scroller>
        <div class="addAddressBox" v-if="!address||!address.name" @click="goAddAddress">
          <div>
            <img class="lt" src="../../../assets/img/cart/add.png"/>
            <div>新增收货地址</div>
          </div>
        </div>
        <div class="addressBox" @click="goAddress()" v-if="address&&address.name">
          <div class="addressTitle">收货信息</div>
          <div class="gg">更改地址</div>
          <img class="lt" src="../../../assets/img/cart/icon_01.png"/>
          <div class="ct">
            <p>
              <span class="userName">{{address.name}}</span>
              <span class="tel">{{address.phone}}</span>
            </p>
            <p class="subTip">{{address.address}}</p>
          </div>
        </div>
        <div class="conBox" v-if="orderInfo.sellerDistributorVO">
          <div class="leader">
            <img class="img" :src="orderInfo.sellerDistributorVO?yasuo(orderInfo.sellerDistributorVO.logo):require('../../../assets/img/cart/shop.png')"/>
            <span>{{orderInfo.sellerDistributorVO.name}}</span>
          </div>

          <div class="goodsBox">
            <div class="itemBox" v-for="good in orderInfo.saleOrderDetailVOList">
              <!--<span class="invalidTip">失效</span>-->
              <img class="img" v-lazy="yasuo(good.goodsPic)"/>
              <div class="rtCon">
                <div class="title">[{{good.brandName}}]{{good.goodsName}}</div>
                <div class="tagBox">
                  <span class="tag">{{good.goodsSpec}}</span>
                </div>
                <div class="priceBox">
                  <span class="price" v-if="good.enquiry==0&&good.taxPrice!=0">&yen;{{good.taxPrice}}</span>
                  <span class="price" v-if="good.enquiry==1">询价</span>
                  <span class="price" v-if="good.taxPrice==0">赠品</span>
                  <!--<x-number class="numBox" width="40px" v-model="changeValue" :min="0" @on-change="change"></x-number>-->
                  <span class="numBox"><div class="sign">x</div><div class="num">{{good.num}}</div></span>

                </div>
                <!--<div class="redTip">已恢复原价</div>-->

              </div>

            </div>
            <!--<div class="itemBox">-->
            <!--&lt;!&ndash;<check-icon :value.sync="isCheck"></check-icon>&ndash;&gt;-->
            <!--<img class="img" src="../../../assets/logo.png"/>-->
            <!--<div class="rtCon">-->
            <!--<div class="title">[鲜厨当道]巴沙鱼柳去皮去200/300</div>-->
            <!--<div class="tagBox">-->
            <!--<span class="tag">900g/包*10/件</span>-->
            <!--</div>-->
            <!--<div class="priceBox">-->
            <!--<span class="price">&yen;10.5</span>-->
            <!--&lt;!&ndash;<x-number class="numBox" width="40px" v-model="changeValue" :min="0" @on-change="change"></x-number>&ndash;&gt;-->
            <!--<span class="numBox"><div class="sign">x</div><div class="num">3</div></span>-->

            <!--</div>-->
            <!--&lt;!&ndash;<div class="redTip">已恢复原价</div>&ndash;&gt;-->

            <!--</div>-->

            <!--</div>-->

          </div>

          <div class="info-item">
            <label class="name">付款方式</label>
            <div class="value">{{orderInfo.payWayDesc}}</div>
          </div>

          <div class="info-item">
            <label class="name">订单备注</label>
            <input maxlength="100" ref="memoInput" style="border:none;outline: none;background-color: rgba(0, 0, 0, 0);" @blur="blurMemo" v-model="memo" class="value" placeholder="请输入备注信息" />
          </div>

          <div class="info-item" @click="chooseRedPacket" >
            <label class="name">店铺优惠</label>
            <div class="value">
              <div v-if="packetList.length>0">红包抵扣</div>
              <div v-if="packetList.length==0">红包抵扣</div>
              <div class="fl">
                <div  v-if="packetList.length>0&&redPacketInfo.value">-¥{{redPacketInfo.value}}</div>
                <img class="lt" src="../../../assets/img/cart/moreRight.png"/>
              </div>
            </div>
          </div>

          <div class="count">
            <label>小计：</label>
            <span>¥{{orderInfo.goodsAmount}}</span>
          </div>
        </div>
      </scroller>
    </div>
    <div v-if="showBtn" class="footer">
      <div class="all-acount"><label>合计：</label>
        <span v-if="orderInfo.goodsAmount">¥{{(orderInfo.goodsAmount-(redPacketInfo.value?redPacketInfo.value:0)) | numFilter}}</span>
        <span v-if="!orderInfo.goodsAmount">¥0</span>
      </div>
      <div class="submit-bt" @click="commit">提交订单</div>
    </div>

    <mo-ticket-panel ref="ticketNode" :data="packetList" :currentRed="redPacketInfo" @packet="setPacket($event)"></mo-ticket-panel>

    </div>
</template>
<script src="./confirm.js"></script>

<style lang="less" scoped>
  @import "./confirm";
</style>


